﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" Src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" Src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" Src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Assembly Name="Winwise.SPWebConfig.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=497a758e307ba99d" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddEditCodeWebconfigModification.aspx.cs"
    Inherits="Winwise.SPWebConfig.UI.AddEditCodeWebconfigModification" MasterPageFile="~/_admin/admin.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<style>
.ms-inputformcontrols
{
    width:100%
}
</style>
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table width="100%" class="propertysheet" cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td class="ms-descriptionText">
                <asp:Label ID="LabelMessage" runat="server" EnableViewState="False" class="ms-descriptionText" />
            </td>
        </tr>
        <tr>
            <td class="ms-error">
                <asp:Label ID="LabelErrorMessage" runat="server" EnableViewState="False" />
            </td>
        </tr>
        <tr>
            <td class="ms-descriptionText">
                <asp:ValidationSummary ID="ValSummary" HeaderText="<%$SPHtmlEncodedResources:spadmin, ValidationSummaryHeaderText%>"
                    DisplayMode="BulletList" ShowSummary="True" runat="server"></asp:ValidationSummary>
            </td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <wssuc:inputformsection runat="server" id="idWebApplicationSelectorSection" title="<%$Resources:spadmin, multipages_webapplication_title%>"
            description="<%$Resources:spadmin, multipages_webapplication_desc%>">
            <template_inputformcontrols>
			        <tr><td>
			        <SharePoint:WebApplicationSelector id="Selector" runat="server"
				        OnContextChange="OnContextChange" />
			        </td></tr>
		        </template_inputformcontrols>
        </wssuc:inputformsection>
         <wssuc:inputformsection title="Type and assembly name" runat="server">
		        <Template_Description>
                    <div style="width:250px">
			           Supply type and assembly name used to handle the web.config modification. It should implement the "Winwise.SPWebConfig.Core.CodeModification. <b>IWebConfigModificationHandler</b>" interface
                    </div>
		        </Template_Description>
		        <Template_InputFormControls>
			         <wssuc:InputFormControl LabelText="Type name" runat="server">
				        <Template_control>
                          <div style="min-width:400px">
                            <asp:TextBox runat="Server" ID="TBTypeName"  Width="100%" />
                          </div>
				        </Template_control>
			        </wssuc:InputFormControl>
                      <wssuc:InputFormControl LabelText="Assembly strong name" runat="server">
				        <Template_control>
                            <asp:TextBox runat="Server" ID="TBAssemblyName"  Width="100%" />
				        </Template_control>
			        </wssuc:InputFormControl>
		        </Template_InputFormControls>
	        </wssuc:inputformsection>
             <wssuc:inputformsection title="Common settings" runat="server">
		        <Template_Description>
			        The Name will be use for display info only<br />
                    Select the zones you wish the modification should be applyed 
		        </Template_Description>
		        <Template_InputFormControls>
			        <wssuc:InputFormControl LabelText="Display Name" runat="server" >
				        <Template_control>
                               <asp:TextBox runat="Server" ID="TBDisplayName" Width="100%" />
				        </Template_control>
			        </wssuc:InputFormControl>
                     <wssuc:InputFormControl LabelText="Zones" runat="server" >
				        <Template_control>
                               <asp:CheckBoxList runat="server" ID="CheckBoxZones" RepeatDirection="Horizontal">
                                    <asp:ListItem Text="Default" Selected="True" />
                                    <asp:ListItem Text="Intranet" Selected="True" />
                                    <asp:ListItem Text="Internet" Selected="True"/>
                                    <asp:ListItem Text="Extranet" Selected="True"/>
                                    <asp:ListItem Text="Custom" Selected="True"/>
                                </asp:CheckBoxList>
				        </Template_control>
			        </wssuc:InputFormControl>
                </Template_InputFormControls>
	        </wssuc:inputformsection>
              <wssuc:buttonsection runat="server">
		    <Template_Buttons>
			    <asp:Button runat="server" ID="BtnAddModif" OnClick="AddModif" Text="Add / Save Code transformation" />
                <asp:Button ID="Button1" runat="Server" Text="Apply web.config modifications" OnClick="ApplyWebConfigModif" />
		    </Template_Buttons>
	    </wssuc:buttonsection>
    </table>
    <br />
    <asp:Label runat="Server" ID="LblResults" />
    <br />
    <a href="/_admin/Winwise.SPWebConfig/ManageWebConfigModif.aspx" rel="sp_DialogLinkInternal" runat="server" id="LinkManage" >Manage web.config modifications</a>
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    Code Web Config Modification page
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea"
    runat="server">
    Code Web Config Modification page
</asp:Content>
